<html>
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=Edge">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Admin C-Panel</title>
	<link rel="stylesheet" type="text/css" href="<?php echo $this->base_url; ?>/public/scripts/ext/resources/css/ext-all.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo $this->base_url; ?>/public/scripts/ext/resources/css/mif.css" />
    <script>
	var Extpath_js = '<?php echo $this->base_url; ?>/public/scripts/ext-plugins/';
	var Base_url = '<?php echo $this->base_url; ?>';
	</script>
	<script type="text/javascript" src="<?php echo $this->base_url; ?>/public/scripts/ext/adapter/ext/ext-base.js"></script>
	<script type="text/javascript" src="<?php echo $this->base_url; ?>/public/scripts/ext/ext-all.js"></script>
	<link rel="icon" href="<?php echo $this->base_url; ?>/public/scripts/ext/resources/img/favicon.ico" type="image/x-icon" />
	<link rel="shortcut icon" href="<?php echo $this->base_url; ?>/public/scripts/ext/resources/img/favicon.ico" type="image/x-icon" />
</head>
<body>
	<div id="loading-mask" class="opacity-70"></div>
	<div id="loading">
		<div class="loading-indicator">
			<img src="<?php echo $this->base_url; ?>/public/scripts/ext/resources/img/extanim64.gif" width="64" height="64" style="margin-right:8px;" align="absmiddle"/>
    		Loading...<br /><em>Developed by MegaAds.</em>
		</div>
	</div>
	<script type="text/javascript" src="<?php echo $this->base_url; ?>/public/scripts/ext-plugins/ux/ext-basex.js"></script>
	<script type="text/javascript" src="<?php echo $this->base_url; ?>/public/scripts/ext-plugins/ux/jit.js"></script>
	<script type="text/javascript">

		(function(){
		var ux= '<?php echo $this->base_url; ?>/public/scripts/ext-plugins/ux/', extux = '<?php echo $this->base_url; ?>/public/scripts/ext-plugins/adapter/';
		 
		Ext.apply(
			$JIT.depends , {
			// JS source file   | source location    | Dependencies (in required load order)
			'uxvismode'   :   {path: ux },
			'multidom'    :   {path: ux },
			'crc32'    	  :   {path: ux },
			'mif'         :   {path: ux ,          depends: ['@multidom' , '@uxvismode', '@crc32'] },
			'mifmsg'      :   {path: ux ,          depends: ['@miframe'] },
			'mifdd'       :   {path: ux ,          depends: ['@miframe'] },
			'miframe'     :   {virtual : true,     depends: ['@mif'] }
		});
		Ext.BLANK_IMAGE_URL = '<?php echo $this->base_url; ?>/public/scripts/ext/resources/img/s.gif';
		 
		var url = location.href.split('#')[0],
			params = url.split('?')[1] || '',
			args = Ext.urlDecode(params) || {}, 
			script = args.script || args.demo ;
		   
		$JIT.setMethod('DOM'); //<script> tags for debugging/viewing
		Ext.ResourceLoader.debug = !!args.debug;  	
	
		//load the demo site startup scripts
		$JIT(
			{debug: true},
			extux + 'ux-all',
			'<?php echo $this->base_url; ?>/public/scripts/ext-plugins/classes/appwin', 
			ux + 'startup'
		);
		
		// tu dong post du lieu len server de giu session
		function autokeep()
		{
			setTimeout(function(){
				Ext.Ajax.request({
					url: '<?php echo $this->base_url; ?>/keep',
					params: {
						task: "keepmeon"
					}, 
					success: function(response){
						var result = eval(response);
						if (result)
						{
							autokeep();
						}
					},
					failure: function(response){}                  
				});
			}, 290000);
		}
		autokeep();
		})();
	
	</script>
</body>
</html>